package com.tongtong.stscommon.message;

import com.tongtong.stscommon.enumration.Message;
import com.tongtong.stscommon.enumration.Status;

/**
 * 成功消息
 */
public class STSSuccessMessage<T> extends STSMessage<T> {
	public static final STSSuccessMessage Empty = STSSuccessMessage.from(null);

	public STSSuccessMessage(T data) {
		super(Status.OK_WITH_DATA, Message.OK, data);
	}

	public STSSuccessMessage(int state, T data) {
		super(state, Message.OK, data);
	}

	public static <T> STSSuccessMessage<T> from(T data) {
		return new STSSuccessMessage<>(data);
	}
}
